package io;

import java.io.FileInputStream;
import java.io.IOException;

public class Test2 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("fos.dat");
//        while (true){
//            int d = fis.read();
//            if (d == -1){
//                break;
//            }
//            System.out.println((char) d);
//        }
//        fis.close();
        int d;
        while ((d = fis.read()) != -1){
            System.out.println((char) d);
        }
        fis.close();
    }
}
